﻿@model IEnumerable<NVSecurity.Models.Training>
@using NVSecurity.Models;
@{
    ViewBag.Title = "Index";
    
}

<div class="mar10 borall">
    <div class="floatl">
        <span class="floatl">
            <img src="/Areas/Admin/images/icon-48-generic.png" /></span>
        <span class="title-name">Đào tạo</span>
    </div>
    <ul class="floatr toolbar-list">
        <li class="button">
            <a class="toolbar" href="/@NVSecurity.Models.GlobalVariables.PathFolderName/Training/Create">
                <span class="icon-32-new"></span>
                Thêm mới
            </a>
        </li>
    </ul>
</div>

<!--end borall-->
<div class="clear0"></div>
<div class="mar10 borall">
    <table class="formtable">
        <tbody>
            <tr>
                <th>Hình ảnh</th>
                <th>Tiêu đề</th>
                <th>Mô tả ngắn</th>
                <th style="text-align:right">Action</th>
            </tr>

            @foreach (var item in Model)
            {
                <tr>
                    <td>
                        <img src="/Images/Training/@(item.ImagePath)"  width="100px" height="78px"/>
                    </td>
                    <td style="width: 30%">
                        @Html.DisplayFor(modelItem => item.Title)
                    </td>
                    <td style="width: 60%">
                        @Html.DisplayFor(modelItem => item.ShortDescription)
                    </td>
                    <td style="text-align: right">
                        <a class="button blue" style="float:right" title="Sửa" href="/@NVSecurity.Models.GlobalVariables.PathFolderName/Training/Edit?id=@item.TrainingId">
                            <div class="icon">
                                <p class="ic-edit"></p>
                            </div>
                        </a>
                        <a class="button red" style="float:right" href="/@NVSecurity.Models.GlobalVariables.PathFolderName/Training/Delete?id=@item.TrainingId" title="Xóa">
                            <div class="icon">
                                <p class="ic-delete"></p>
                            </div>
                        </a>

                    </td>
                </tr>
            }
        </tbody>
    </table>
</div>
<script>$("tr:even").css("background-color", "#f2f2f2");</script>
